﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace NGinnBPM.Lib.Messages
{
    /// <summary>
    /// Message for NGinn telling it to complete a task instance.
    /// NGinn should reply with ...TODO...
    /// </summary>
    [DataContract]
    public class CompleteTask
    {
        [DataMember]
        public string InstanceId { get; set; }
        [DataMember]
        public string CompletedBy { get; set; }
        [DataMember]
        public Dictionary<string, object> UpdatedData { get; set; }
    }

    /// <summary>
    /// Cancel a task
    /// Message for NGinn
    /// </summary>
    [DataContract]
    public class CancelTask
    {
        [DataMember]
        public string InstanceId { get; set; }
    }

    /// <summary>
    /// Fail a task instance
    /// Message for NGinn
    /// </summary>
    [DataContract]
    public class FailTask
    {
        [DataMember]
        public string InstanceId { get; set; }
        [DataMember]
        public string ErrorInfo { get; set; }
    }

    /// <summary>
    /// Select a task instance
    /// Message for NGinn
    /// </summary>
    [DataContract]
    public class SelectTask
    {
        [DataMember]
        public string InstanceId { get; set; }
    }
}
